﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Shop.Model;
using System.Web.UI.WebControls;
using System.Web.Mvc;
using Shop.Framework.Services;

namespace Shop.Framework.Control {
    public class CategoryBuilderControl:ViewUserControl {
        
        
        public List<Category> Categories { get; set; }
        protected override void OnInit(EventArgs e) {
            CategoryService service = new CategoryService();
            Categories = service.GetCategories().Where(cat => !cat.IsDisabled).ToList();
            base.OnInit(e);
        }

    }
}
